package com.gzsxy.esjy.feign.Order;

import com.gzsxy.esjy.common.base.exception.impl.CustomAssert;
import com.gzsxy.esjy.service.base.dto.response.DefaultResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;


/**
 * @author xiaolong
 * @version 1.0
 * @description: 熔断降级  （payment/feign/timeout服务提供方出现异常会进入）
 * @date 2022/2/18 15:20
 */
@Component
public class OrderClientHystrix implements OrderFeignService {

    private final static Logger log = LoggerFactory.getLogger(OrderClientHystrix.class);

    /**
     * @param userId 商家id
     * @return
     * @description:  订单统计
     */
    @Override
    public DefaultResponse getOrderStatistical(String userId) {
        log.error("【订单微服务异常】远程统计商家订单失败");
        return DefaultResponse.error("【订单微服务异常】远程统计商家订单失败");
    }
}
